<form class="layui-form pt10" action="{:url()}" method="post" id="editForm">
    <div class="layui-form-item">
        <label class="layui-form-label">产品名称</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-name" name="name" lay-verify="title" autocomplete="off" placeholder="请输入产品名称">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">产品编码</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-coded" name="coded" lay-verify="title" autocomplete="off" placeholder="请输入产品编码">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">供应商</label>
        <div class="layui-input-inline">
            <select name="supplier_id" class="field-supplier_id" type="select" lay-verify="required" lay-search="">
                <option value="">请选择供应商</option>
                {$supplier|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">产品分类</label>
        <div class="layui-input-inline">
            <select name="category_id" class="field-category_id" type="select" lay-verify="required" lay-search="">
                <option value="">请选择分类</option>
                {$category|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">产品品牌</label>
        <div class="layui-input-inline">
            <select name="brand_id" class="field-brand_id" type="select" lay-verify="required" lay-search="">
                <option value="">请选择品牌</option>
                {$brand|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">成本价</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-price1" name="price1" lay-verify="number" autocomplete="off" placeholder="请输入成本价">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">售价</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-price2" name="price2" lay-verify="number" autocomplete="off" placeholder="请输入售价">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">规格</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-specs" name="specs" lay-verify="title" autocomplete="off" placeholder="请输入规格">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">单位</label>
        <div class="layui-input-inline">
            <select name="unit_id" class="field-unit_id" type="select" lay-verify="required">
                <option value="">请选择单位</option>
                {$unit|raw}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">分解单位</label>
        <div class="layui-input-inline">
            <select name="decomposition_id" class="field-decomposition_id" type="select" lay-verify="required">
                <option value="">请选择分解单位</option>
                {$unit|raw}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-weigh" name="weigh" value="50" lay-verify="number" autocomplete="off" placeholder="请输入排序">
        </div>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="hidden" class="field-id" name="id">
        </div>
    </div>
    <div class="pop-bottom-bar hisi-footer">
        <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit" hisi-data="{pop: true, refresh: true}">提交保存</button>
        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
    </div>
</form>
{include file="system@block/layui" /}
<script>
layui.use(['func','laydate'], function() {
    //常规用法
    var laydate = layui.laydate;
    laydate.render({
          elem: '#date',
          trigger:'click'
        });

    layui.func.assign({:json_encode($formData)});


});
</script>
